﻿using System;
using Fly.Data;
using FlyWebFrame.Model;

namespace FlyWebFrame.Action
{
    public abstract class baseaction : Fly.Web.Action.Handler
    {
        public string page_title = "LEAD Consulting - Trang quản trị";
        public string contentleft = "/html/admin/controlpanel.htm";
        public string login_name;
        public string admin_script = "$('#ad_news').addClass('active');";
        public int TotalVisited;
        public int TotalOnline;

        public void Handle()
        {
            if (!Admin.Logged())
            {
                Redirect("/admin/login");
            }

            SetView("/html/admin/main.htm");
            login_name = Fly.Web.Session.Get("Name").ToString();
            TotalVisited = Fly.Web.Application.GetVisit();
            TotalOnline = Fly.Web.Application.GetOnline();

            this.Treat();
        }

        public abstract void Treat();
        
    }
}